package com.zoey.boot.controller;

import com.zoey.boot.entity.Student;
import com.zoey.boot.entity.Teacher;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 获取配置文件
 * @Author: daniel
 * @Date: 2023-12-06 11:45
 * @Version: 1.0
 **/

@Slf4j
@RestController
public class PropertiesConfigGet {

    @Autowired
    private Student student;
    @Autowired
    private Teacher teacher;

    @GetMapping("/conf")
    public Student getConfig() {
        log.info("student:{}", student);
        return student;
    }

    @GetMapping("/conf/value")
    public Teacher getValueConfig() {
        log.info("teacher:{}", teacher);
        return teacher;
    }
}
